import http from "@/api";

import { PORT1 } from "@/api/config/servicePort";

export interface OptionType {
	value : string | number;
	label : string;
}

//获取商品类型下的码制和尺码数据
export const getSizeStandard = (data : Record<string, any>) =>
	http.post(`${PORT1}/goods-config/settings/size-standard-group/size-standard`, { ...data }, { loading: false });

//左侧菜单
export const letTree = (data : Record<string, any>) =>
	http.post(`${PORT1}/goods-config/settings/size-standard-group/tree`, { ...data }, { loading: false });

//添加合并
export const addData = (data : Record<string, any>) =>
	http.post(`${PORT1}/goods-config/settings/size-standard-group/create`, { ...data }, { loading: false });

//修改合并
export const editData = (data : Record<string, any>) =>
	http.post(`${PORT1}/goods-config/settings/size-standard-group/edit`, { ...data }, { loading: false });

//初始化信息
export const initData = (data : Record<string, any>) =>
	http.post(`${PORT1}/goods-config/settings/size-standard-group/index`, { ...data }, { loading: false });

//表头 
export const getTableHeader = (params ?: any) => {
	return http.post<{ [k : string] : any[] }>(`${PORT1}/goods-config/settings/size-standard-group/field`, params, { loading: false });

};

//列表
export const getTableData = (params ?: any) => {
	return http.post<{ [k : string] : any[] }>(`${PORT1}/goods-config/settings/size-standard-group/list`, params, { loading: false });
	//return  Promise.resolve(headTabs) 
};